package com.example.superinbox;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.widget.ArrayAdapter;
import android.widget.Spinner;

public class NewCategory extends Activity {

	Spinner categoryPrioritySpinner;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_new_category);
		// Finiding view
		categoryPrioritySpinner = (Spinner) findViewById(R.id.sp_category_priority);
		populateSpinners();
	}

	private void populateSpinners() {

		ArrayAdapter<CharSequence> fAdapter;
		fAdapter = ArrayAdapter.createFromResource(this, R.array.array_category_priority, android.R.layout.simple_spinner_item);
		int spinner_dd_item = android.R.layout.simple_spinner_dropdown_item;
		fAdapter.setDropDownViewResource(spinner_dd_item);
		categoryPrioritySpinner.setAdapter(fAdapter);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.activity_new_category, menu);
		return true;
	}

}
